home *** CD-ROM | disk | FTP | other *** search
- /*
- * Ray.h - class definition for ray manipulations.
- *
- * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
- * University of Berne, Switzerland
- * All rights reserved.
- *
- * This software may be freely copied, modified, and redistributed
- * provided that this copyright notice is preserved on all copies.
- *
- * You may not distribute this software, in whole or in part, as part of
- * any commercial product without the express consent of the authors.
- *
- * There is no warranty or other guarantee of fitness of this software
- * for any purpose. It is provided solely "as is".
- *
- */
-
- #ifndef Ray_H
- # define Ray_H
-
- #include "Vector.h"
-
- class TransMatrix;
-
- //___________________________________________________________ Ray
-
- class Ray
- {
- public:
- Ray(const Vector&, const Vector&);
-
- real transform(const TransMatrix&);
- const Vector& getOrig() const;
- const Vector& getDir() const;
-
- private:
- Vector orig; // origin
- Vector dir; // direction
- };
-
- inline const Vector& Ray::getOrig() const {
- return orig;
- }
-
- inline const Vector& Ray::getDir() const {
- return dir;
- }
-
- #endif // Ray_H
-